package kr.saeildamil.androidstudy_second.br_service;

import kr.saeildamil.andrordstudy.second.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class NewsIntentServiceTest extends Activity implements OnClickListener{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch2930_newsintentservicetest);
		findViewById(R.id.boundservice_start).setOnClickListener(this);
		findViewById(R.id.news_stop).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent(this, NewsService.class);
		switch(v.getId()){
		case R.id.boundservice_start:
			startService(intent);
			break;
		case R.id.news_stop:
			stopService(intent);
			break;
		}
	}
}
